@import '~highlight.js/styles/xcode.css';
.ai-chat {
  // border: 1px solid #1677FF;
  position: relative;

  height: calc(100vh - 190px);
  .chat-box {
    // border: 1px solid red;
    padding: 10px;
    height: calc(100vh - 300px);
    overflow-y: auto;

    .ai, .user {
      display: flex;
      margin-bottom: 10px;
    }

    .user {
      justify-content: flex-end;
    }

    .ai-avatar,.user-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: #1677FF;
      color: white;
      text-align: center;
      line-height: 40px;
      font-size: 20px;
      font-weight: 600;
    }

    .ai-avatar { 
      margin-right: 10px;
    }
    .user-avatar {
      margin-left: 10px;
    }

    .ai-content,.user-content {
      max-width: calc(100% - 50px);
      background-color: rgba(0,0,0,0.1);
      white-space: pre-wrap;
      word-wrap: break-word;
      overflow-wrap: break-word;
      // 可选补充属性
      hyphens: auto; // 英文单词连字符换行
      overflow: visible; // 确保内容可见
      padding: 8px 14px;
      font-size: 16px;
      border-radius: 15px;
    }
  }

  .input-box {
    border: 1px solid rgba(0,0,0,0.1);
    width: 70%;
    height: 100px;
    border-radius: 10px;
    padding: 10px;
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);

    &:hover {
      box-shadow: 0 0 12px rgba(0,0,0,0.2);
    }
  }

  .ai-reason {
    max-width: calc(100% - 50px);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    // 可选补充属性
    hyphens: auto; // 英文单词连字符换行
    overflow: visible; // 确保内容可见
    padding: 8px 14px;
    font-size: 14px;
    color: #666;
    border-left: 2px solid rgba(0,0,0,0.1);
    margin-bottom: 8px;
  }
}